<template>
  <div class="App">
    <h1 class="content">我是App</h1>
    <p>当前用户访问量{{userNum| splitNumsComma}}</p>
    <p>价格1:{{ price1 | priceFormat(2) | add$ }}</p>
    <p>价格2:{{ price2 | priceFormat(3) | add$ }}</p>
   
    <Count/>
  </div>
</template>

<script>
import Count from '@/components/Count';


export default {
  name: 'App',
  components: {
    Count,
  },
 data(){
  return {
    count :0,
    userNum:14567352368682,
    price1:12.689,
    price2:15.657,
    price3:19.999,

  }
 
 },
  filters:{
    splitNumsComma(value) {
      const reg =/(\d)(?=(\d{3})+$)/g;
      return String(value).replace(reg,"$1,")
    }
  }

}
</script>



